package com.sand.entity;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "t_common_type", schema = "ssh_pro", catalog = "")
public class TCommonTypeEntity {
    /**
     * @author <achao1441470436@gmail.com>
     * @since 2021/11/28/028 14:46
     */
    private int id;
    private int groupId;
    private int typeKey;
    private String typeName;
    private String typeLabel;
    private int enable;

    @Id
    @Column(name = "ID")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "GROUP_ID")
    public int getGroupId() {
        return groupId;
    }

    public void setGroupId(int groupId) {
        this.groupId = groupId;
    }

    @Basic
    @Column(name = "TYPE_KEY")
    public int getTypeKey() {
        return typeKey;
    }

    public void setTypeKey(int typeKey) {
        this.typeKey = typeKey;
    }

    @Basic
    @Column(name = "TYPE_NAME")
    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    @Basic
    @Column(name = "TYPE_LABEL")
    public String getTypeLabel() {
        return typeLabel;
    }

    public void setTypeLabel(String typeLabel) {
        this.typeLabel = typeLabel;
    }

    @Basic
    @Column(name = "ENABLE")
    public int getEnable() {
        return enable;
    }

    public void setEnable(int enable) {
        this.enable = enable;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TCommonTypeEntity that = (TCommonTypeEntity) o;
        return id == that.id && groupId == that.groupId && typeKey == that.typeKey && enable == that.enable && Objects.equals(typeName, that.typeName) && Objects.equals(typeLabel, that.typeLabel);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, groupId, typeKey, typeName, typeLabel, enable);
    }
}
